package erp_models

import "xiehui-service/app/models"

// 配比材料关联表
type TphbMaterial struct {
	models.ID
	TphbId       int     `gorm:"column:tphb_id" json:"tphb_id"`             //配比ID
	MaterialId   int     `gorm:"column:material_id" json:"material_id"`     //材料ID
	Weight       float64 `gorm:"column:weight" json:"weight"`               //用量(kg)
	SupplierId   int     `gorm:"column:supplier_id" json:"supplier_id"`     //标准配比的供货商id
	SupplierName string  `gorm:"column:supplier_name" json:"supplier_name"` //标准配比的供货商名称
	models.Timestamps
	models.SoftDeletes
}

// TableName 解决gorm表明映射
func (TphbMaterial) TableName() string {
	return "tphb_material"
}
